package com.webchat.rmi.ugc.mall.im;


import com.webchat.domain.vo.request.mall.im.MallChatRecommendAnswerReqVO;
import com.webchat.rmi.config.FeignConfig;
import com.webchat.rmi.interceptor.RpcRequestInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import reactor.core.publisher.Flux;

/**
 * 声明用户对话消息基础服务 客户端
 */
@FeignClient(name = "webchat-ugc-service",
             contextId = "mallAiBotClient",
             configuration = {RpcRequestInterceptor.class})
public interface MallAiBotClient {


    /**
     * 电商智能客服问题推荐
     *
     * @param chatRecommendAnswerReqVO
     * @return
     */
    @PostMapping(value = "/ugc-service/mall/im/recommend/answer", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
    Flux<String> recommendAnswers(@RequestBody MallChatRecommendAnswerReqVO chatRecommendAnswerReqVO);

}
